package datatype;

import util.JedisUtil;

import java.util.HashMap;
import java.util.List;

/**
 * @Auther: 肖冬
 * @Date: 2020/8/16 16:47
 * @Description:
 */
public class HashTest {
    public static void main(String[] args) {

        HashMap<String, String> h1val = new HashMap<>();
        h1val.put("a","1");
        h1val.put("b","2");
        h1val.put("c","3");
        h1val.put("d","4");
        h1val.put("e","5");

        JedisUtil.getJedisUtil().hmset("h1",h1val);

        String h1 = JedisUtil.getJedisUtil().hget("h1", "a");
        System.out.println(h1);

        List<String> list = JedisUtil.getJedisUtil().hmget("h1", "a", "b", "c", "d", "e");
        System.out.println(list);
    }
}
